package com.jianyun.jyzs.model.imdoel;

import com.jianyun.jyzs.bean.NewSign2Bean;
import com.jianyun.jyzs.bean.NewSignRecodeBean;
import com.jianyun.jyzs.bean.Sign2Bean;
import com.jianyun.jyzs.bean.SignNewReslut;
import com.jianyun.jyzs.bean.SignStateBean;

import java.util.HashMap;
import java.util.List;

/**
 * Created by yangshijun on 2018/8/2.
 * 打卡2
 */

public interface INewSign2Model {

    /**
     * 获取某天的打卡记录
     *
     * @param userId
     * @param enterpriseCode
     * @param date
     * @param onGetRecordListener
     */
    void getRecordeByDate(String enterpriseCode, String userId, String date, OnGetRecordListener onGetRecordListener);

    /**
     * 开始打卡
     *
     * @param hashMap
     * @param onNewSignListener
     */
    void newSign2(HashMap<String, String> hashMap, OnNewSignListener onNewSignListener);

    /**
     * 用户更新打卡
     *
     * @param hashMap
     * @param onNewSignListener
     */
    void updateSign2(HashMap<String, String> hashMap, OnNewSignListener onNewSignListener);

    /**
     * 获取用户打卡状态
     *
     * @param enterpriseCode
     * @param userId
     * @param onGetNowStateListener
     */
    void getUserSignState(String enterpriseCode, String userId, String signType,OnGetNowStateListener onGetNowStateListener);


    /**
     * 获取记录监听
     */
    public interface OnGetRecordListener {
        void onGetSuccess(List<NewSign2Bean.SignDetail> signDetail);

        void onFailed(String msg);
    }

    /**
     * 打卡
     */
    interface OnNewSignListener {
        void onSuccess(Sign2Bean newSignReslut);

        void onFailed(String msg);
    }

    /**
     * 获取用户打卡的状态，是否迟到，早退
     */
    interface OnGetNowStateListener {
        void onSuccess(SignStateBean signStateBean);

        void onFailed(String msg);
    }
}
